const mongoose = require("mongoose");
const Schema = mongoose.Schema;

// Create Schema
const CarouselSchema = new Schema(
  {
    image: {
      type: String,
      required: true,
    },
    title: {
      type: String,
      required: true,
    },
    uploadDate: {
      type: Date,
      default: Date.now,
    },
  },
  { versionKey: false }
);

module.exports = Carousel = mongoose.model("carousel", CarouselSchema);
